gusucode.com > 耐品图片管理系统 标准版A > 耐品图片管理系统 标准版A/Lostpass.asp
<!--#include file="Head.asp"--> <!--#include file="Inc/Md5.asp"--> <!--#include file="Inc/clsEmail.asp"--> <!--#include file="Function.asp"--> <!--#include file="Api/Api_Class.asp"--> <% '=============================================================== ' 著作权号:中国国家版权局著作权登记号2004SR07385 ' 版权所有:深圳市耐品科技开发有限公司 www.naipin.com ' 联系电话:0755-26611119 81234844 81234845 ' 联系手机:13316911914 ' 联系邮箱:naipin@naipin.com '=============================================================== Dim UserName,Action Set Rs = Server.CreateObject("adodb.recordset") With Netout .Load("Comm") Action = .CheckStr(request.QueryString("Action"),"") UserName = .CheckStr(Request.Form("UserName"),"") If Action = "" Then theHtml = replace(Template.Html(12),"{?CheckCode}",.GetCode()) ElseIf Action = "Get" Then Dim CheckCode,Rs CheckCode = .CheckNumeric(Request.Form("CheckCode")) If CheckCode <> CInt(Session("GetCode")) Then Netout.ShowErr(11) Response.End() End If Rs.Open "Select Question From Nt_User where UserName='"&UserName&"'",Conn,1,1 If Rs.Eof Then Netout.ShowErr(15) Response.End() Else theHtml = replace(Template.Html(13),"{?UserName}",UserName) theHtml = Replace(theHtml,"{?Question}",Rs(0)) End If Rs.Close ElseIf Action = "answer" Then Dim Answer,UserEmail,Password Answer = Request.Form("Answer") Answer = MD5(Answer,Api_Md5_Len) Rs.Open "Select * From Nt_User Where UserName='"&UserName&"' and answer='"&Answer&"'",Conn,1,3 If Rs.Eof Then Rs.Close .ShowErr(18) Response.End() Else Password = Createpass() UserEmail = Rs("UserEmail") Set Rs1 = Server.CreateObject("adodb.recordset") Rs1.Open "Nt_MailSetup",Conn,1,1 If Rs1("SmtpHost")&"" = "" Then .ShowErr(19) Else Set Mail = New Lyout_Mail Mail.SmtpServer = Rs1("SMTPHost") Mail.UserName = Rs1("SMTPUser") Mail.Password = Rs1("SMTPPass") Mail.FromName = Rs1("FromName") Mail.FromEmail = Rs1("FromEmail") Mail.SendObject = CInt(Rs1("objSend")) Mail.SendMail UserEmail,Config.SiteName&" 重新设置密码","尊敬的用户,您登录我们网站的新密码是 "&Password If Instr(Mail.Description,"成功") Then Rs("Password") = MD5(Password,Api_Md5_Len) Rs.Update() '----------------------------------------------------------------- '系统整合 '----------------------------------------------------------------- Dim objApi,SysKey If Api_Enable Then Set objApi = New Lyout_Api objApi.NodeValue "action","update",0,False objApi.NodeValue "username",UserName,1,False Md5OLD = 1 SysKey = Md5(objApi.XmlNode("username")&Api_SysKey,Api_Md5_Len) Md5OLD = 0 objApi.NodeValue "syskey",SysKey,0,False objApi.NodeValue "password",Password,1,False objApi.NodeValue "mobile",Rs("Mobile"),1,False objApi.NodeValue "phone",Rs("Phone"),1,False objApi.SendHttpData If objApi.Status = "1" Then .ShowError(objApi.Message) Response.End() End If Set objApi = Nothing End If Response.Write("<script>alert('"&.theCode(16)&"');this.location.href='./';</script>") Else .ShowErr(19) End If Set Mail = Nothing End If Rs1.Close Set Rs1 = Nothing Rs.Close Set Rs = Nothing Set Netout = Nothing Response.End() End If End If MyHtml = Replace(Replace(Split(Template.Html(0),"||")(0),"{?left_beg}",""),"{?left_end}","") MyHtml = Replace(MyHtml,"{?RightInfo}",theHtml) MyHtml = Replace(MyHtml,"{?LeftInfo}",Replace(Template.Html(1),"{?QuickLaunch}",QuickLaunch())) MyHtml = Replace(.TempHtml,"{?CurrentScript}",MyHtml) Response.Write(MyHtml) End With Set Netout = Nothing %>